package com.braveo.dict.creator.app.folder;

import java.util.Arrays;
import java.util.List;

public class ImageFileUtils {
	
	private ImageFileUtils() {
		throw new AssertionError();
	}
	
	public static List<String> getAllSuffix() {
		return Arrays.asList("png", "gif", "jpg", "jpeg");
	}
	
	public static String getMimeType(String suffix) {
		suffix = suffix.toLowerCase();
		
		if(suffix.equals("png"))
			return "image/png";
		if(suffix.equals("gif"))
			return "image/gif";
		if(suffix.equals("jpg") || suffix.equals("jpeg"))
			return "image/jpeg";
		
		throw new RuntimeException("Unsupported image type: " + suffix);
	}
	
}
